---
title: Case a single word
summary: Applies word-list-driven casing rules to a single token during title-case conversion.
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-21
library: SAIF.Business.Utilities
reference_type: embedded
operation_id: op-02-case-single-word
trigger: Called once per token from op-01 step 4
---

# Case a single word

Applies a first-match-wins sequence of casing rules (preformatted mixed-case, acronym list, minor-word list, irregular spelling, ordinal suffix, default proper-case) to a single word token.

| Field | Value |
| --- | --- |
| **Operation ID** | op-02-case-single-word |
| **Trigger** | Called once per token from [Convert text to title case](op-01-convert-to-title-case.md), step 4 |
| **Inputs** | Word token (`String`) |
| **Outputs** | Cased word |
| **Primary components** | `TitleCaseSingleWord` (private), `HasNumberSuffix`, `ToProperCase` |
| **Entry point** | SAIF.Business.Utilities/TitleCase.vb |

## Steps

First matching branch wins:

1. If the word already contains both an upper-case and a lower-case character, return it untouched — pre-formatted mixed-case input is respected ([BR-004](../business-rules.md#br-004-preformatted-mixed-case)).
2. Else if `word.ToUpper` is in `UpperCaseWordList`, upper-case the word ([BR-005](../business-rules.md#br-005-acronyms-and-abbreviations)).
3. Else if `word.ToLower` is in `LowerCaseWordList`, lower-case the word ([BR-006](../business-rules.md#br-006-minor-words)).
4. Else if `word.ToLower` matches an entry of `MixedCaseWordList` case-insensitively, replace with that list's canonical spelling (e.g. `PhD`, `LaCombe`) ([BR-007](../business-rules.md#br-007-irregular-mixed-case-spelling)).
5. Else if `HasNumberSuffix(word)` — the token splits into a purely numeric part plus one of `st/nd/rd/th` — rejoin the number with the lower-cased suffix ([BR-008](../business-rules.md#br-008-ordinal-suffix-normalization)).
6. Else apply `ToProperCase` (`StrConv ... VbStrConv.ProperCase`) ([BR-009](../business-rules.md#br-009-default-proper-casing)).
7. Post-step: if the resulting word starts with a `MixedCasePrefixList` entry (`Mc`, `O'`), keep the prefix as-is and proper-case the remainder ([BR-012](../business-rules.md#br-012-surname-prefixes)).

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start(["Caller invokes<br>TitleCaseSingleWord"]) --> MixedCheck{Contains both upper-<br>and lower-case chars?}
	MixedCheck -->|Yes| ReturnAsIs(["Return word untouched"])
	MixedCheck -->|No| UpperCheck{word.ToUpper in<br>UpperCaseWordList?}
	UpperCheck -->|Yes| UpperCase["Upper-case the word"]
	UpperCheck -->|No| LowerCheck{word.ToLower in<br>LowerCaseWordList?}
	LowerCheck -->|Yes| LowerCase["Lower-case the word"]
	LowerCheck -->|No| MixedListCheck{Matches MixedCaseWordList<br>case-insensitively?}
	MixedListCheck -->|Yes| Canonical["Replace with canonical<br>spelling"]
	MixedListCheck -->|No| SuffixCheck{HasNumberSuffix?}
	SuffixCheck -->|Yes| Rejoin["Rejoin number with<br>lower-cased suffix"]
	SuffixCheck -->|No| ProperCase["Apply ToProperCase"]
	UpperCase --> PrefixCheck{Starts with<br>MixedCasePrefixList entry?}
	LowerCase --> PrefixCheck
	Canonical --> PrefixCheck
	Rejoin --> PrefixCheck
	ProperCase --> PrefixCheck
	PrefixCheck -->|Yes| KeepPrefix["Keep prefix as-is,<br>proper-case remainder"]
	PrefixCheck -->|No| Done(["Return cased word"])
	KeepPrefix --> Done
```

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `SAIF.Business.Utilities/TitleCase.vb`
